<% include ../public/page_header.html %>
   
    <!--
        列表展示
    -->
    <div class="table-responsive">
        <table class="table table-bordered">
            <thead>
                <tr class="th">
                    <th>模块名称</th>
                    <th>节点类型</th>
                    <th>操作名称</th>     
                    <th>操作地址</th>                        
                    <th>排序</th>
                    <th>描述</th>
                    <th class="text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                <%for(var i=0;i<list.length;i++){%>
                    <tr>
                        <td><%=list[i].moduleName%></td>
                        <td>     
                                <%if(list[i].type==1){%>
                                    模块
                                <%}else if(list[i].type==2){%>
                                    菜单
                                <%}else{%>
                                    操作
                                <%}%>
                        </td>
                        <td><%=list[i].actionName%></td>

                        <td><%=list[i].url%></td>
                        <td><%=list[i].sort%></td>

                        <td><%=list[i].description%></td>
                    
                        <td class="text-center">
                            
                            <a href="/<%=adminPath%>/access/edit?id=<%=list[i].id%>">修改</a>
                            <a class="delete" href="/<%=adminPath%>/access/delete?id=<%=list[i].id%>">删除</a>
                        </td>
                    </tr>

                    <%for(var j=0;j<list[i].accesses.length;j++){%>
                        <tr>
                            <td>---<%=list[i].accesses[j].moduleName%></td>
                            <td>     
                                    <%if(list[i].accesses[j].type==1){%>
                                        模块
                                    <%}else if(list[i].accesses[j].type==2){%>
                                        菜单
                                    <%}else{%>
                                        操作
                                    <%}%>
                            </td>
                            <td><%=list[i].accesses[j].actionName%></td>
    
                            <td><%=list[i].accesses[j].url%></td>
                            <td><%=list[i].accesses[j].sort%></td>
    
                            <td><%=list[i].accesses[j].description%></td>
                        
                            <td class="text-center">
                                <a href="/<%=adminPath%>/access/edit?id=<%=list[i].accesses[j].id%>">修改</a>
                                <a class="delete" href="/<%=adminPath%>/access/delete?id=<%=list[i].accesses[j].id%>">删除</a>
                            </td>
                        </tr>
    
                    <%}%>

                <%}%>
               

            </tbody>
        </table>
    </div>


    </body>

    </html>